package com.shd.edanpei.bean;

import com.shd.edanpei.R;
import com.shd.edanpei.common.Constant;

/**
 * Created by mc on 2018/10/22.
 * yang-wen-wen
 */

public class OnlinePayModel {
    /**
     * aliService : 301.79
     * weService : 302.99
     * orderType : 1
     * lastAmount : 1.0
     * lastTerm : 等额本息
     * serviceFee : 299.99
     * aliMsg : 需增支付0.6%手续费
     * 例：1006元（6元手续费由用户承担）
     * weMsg : 需增支付1.0%手续费
     * 例：1010元（10元手续费由用户承担）
     */

    private double aliService;
    private double weService;
    private int orderType;
    private double lastAmount;
    private String lastTerm;
    private double serviceFee;
    private String aliMsg;
    private String weMsg;
    private double aliFloatAmount;
    private double weFloatAmount;

    public double getAliService() {
        return aliService;
    }

    public void setAliService(double aliService) {
        this.aliService = aliService;
    }

    public double getWeService() {
        return weService;
    }

    public void setWeService(double weService) {
        this.weService = weService;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public String getLastAmount() {
        return lastAmount + Constant.Unit.WANYUAN.getUnit();
    }

    public void setLastAmount(double lastAmount) {
        this.lastAmount = lastAmount;
    }

    public String getLastTerm() {
        return lastTerm;
    }

    public void setLastTerm(String lastTerm) {
        this.lastTerm = lastTerm;
    }

    public String getServiceFee() {
        return serviceFee + Constant.Unit.YUAN.getUnit();
    }

    public void setServiceFee(double serviceFee) {
        this.serviceFee = serviceFee;
    }

    public String getAliMsg() {
        return aliMsg;
    }

    public void setAliMsg(String aliMsg) {
        this.aliMsg = aliMsg;
    }

    public String getWeMsg() {
        return weMsg;
    }

    public void setWeMsg(String weMsg) {
        this.weMsg = weMsg;
    }

    public String getPayInfo(int id) {
        switch (id) {
            case R.id.rbt_alipay:
                return "确认支付" + (aliService) + Constant.Unit.YUAN.getUnit() + "\n(含" + aliFloatAmount + "元手续费)";
            case R.id.rbt_wechat:
                return "确认支付" + (weService) + Constant.Unit.YUAN.getUnit() + "\n(含" + weFloatAmount + "元手续费)";
            default:
                return "";
        }
    }


}
